package dec;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: fzykd
 * Date: 2023-05-08
 * Time: 19:44
 */

public class CoffeeBar {
    //咖啡店 点咖啡
    public static void main(String[] args) {
        //装饰者模式下的订单 2份巧克力 + 一份牛奶的LongBlack

        //1.先点LongBlack
        Drink oder = new LongBlack();
        //单品价格 还没有装饰他
        System.out.println(oder.cost());

        //3.加一分巧克力
        oder = new Chocolate(oder);
        System.out.println("再加一份巧克力的价格:" + oder.cost());
        System.out.println(oder.getDes());



    }
}
